processDeposit()
method.
TRUEprocessDeposit()
method.
FALSE
processDeposit()
method.
FALSEprocessDeposit()
method.
TRUEWhen several methods have the same name, which method is required by the call is easy to determine:
The method to use is the one with formal parameters that match the actual parameters in the call.
For example, the call
bobsAccount.processDeposit( 200, 25 ); //statement A
matched this method declaration:
void processDeposit( int amount, int serviceCharge )
because the number and types of the actual parameters matches the number and types of the formal paramters.
The signature of a method is:
The signatures of the methods in a class must be unique. For example, the signatures of the two processDeposit methods are:
The return type is not part of the signature, and that the identifiers used for the formal parameters are not part of the signature.